<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$person}</title>
    {include file="inset/head/head_css.tpl"}
    {include file="inset/head/head_js.tpl"}
</head>
<body>
    	
    <div class="b-popup none">
        <div class="showp" style="margin:10% auto;text-align: center;"></div>
    </div>
    <div class="wrapper">
        {include file="inset/header.tpl"}
        
        {include file="inset/menu/vermenu.tpl"}
	
        <div class="content">
	    <div class="toolbar">
		<div title="Обновить" id="toolbar_refresh_product" class="toolbar_button refresh"></div>
		<div title="Сохранить" id="toolbar_save_product" class="toolbar_button save"></div>
		{*<div title="Печать"  id="toolbar_print_product" class="toolbar_button print"></div>
		<div title="Сформировать отчёт" id="toolbar_report_product" class="toolbar_button report"></div>*}
	    </div><!--toolbar-->
	    
            <div class="detailed">
		<form>
		    <div class="cl_data">
			<div><label>Код продукта:</label></div>
			<div><input id="id" style="width:130px;" type="text" readonly class="readonly" value="{$product_data.0.id}"/></div>
		    </div>
		    <div class="cl_data">
			<div><label>Категория:</label></div>
			<div>
			    <select class="validate[required]"  id="product_category">
			    {for  $i=0 to $categories|@count-1}
				{if $product_data.0.category ==$categories.$i.name}
				<option value="{$categories.$i.id}" selected>{$categories.$i.name}</option>
				{else}
				<option value="{$categories.$i.id}">{$categories.$i.name}</option>
				{/if}
			    {/for}
			    </select>
			</div>
		    </div>
		    <div class="cl_data id_fabricator_product">
			<div><label>Производитель:</label></div>
			<div>
			    <select class="validate[groupRequired[payments]]"  id="id_fabricator_product">
			    <option></option>
			    {for  $i=0 to $fabricator|@count-1}
				{if $product_data.0.fabricator == $fabricator.$i.name}
				<option value="{$fabricator.$i.id}" selected>{$fabricator.$i.name}</option>
				{else}
				<option value="{$fabricator.$i.id}">{$fabricator.$i.name}</option>
				{/if}
			    {/for}
			    </select>
			</div>
		    </div>
		    <div class="cl_data fabricator_new none">
			<div><label>Новый пр-ль:</label></div>
			<div><input type="text" class="validate[groupRequired[storage]]" id="fabricator_product" name="fabricator"/></div>
		    </div>
		    
		    <div class="cl_data">
			<div><label>Название продукта:</label></div>
			<div><input id="s_product_name" type="text"  class="validate[validate[required]]"   value="{$product_data.0.name}"/></div>
		    </div>
		    <div class="cl_data">
			<div><label>Дата создания продукта:</label></div>
			<div><input  readonly class="readonly" type="text" value="{$product_data.0.date}"/></div>
		    </div>
		    <div class="cl_data">
			<div><label>Цена(входящая) за единицу товара, грн:</label></div>
			<div><input id="price" class="validate[required,custom[number]]"  type="text" value="{$product_data.0.price}"/></div>
		    </div>
                    <div class="cl_data">
			<div><label>Цена(отпускная) за единицу товара, грн:</label></div>
			<div><input id="price_selling" class="validate[required,custom[number]]"  type="text" value="{$product_data.0.price_selling}"/></div>
		    </div>
		    <div class="cl_data">
			<div><label>Количество:</label></div>
			<div><input id="count" class="validate[required,custom[integer]]"  type="text" value="{$product_data.0.count}"/></div>
		    </div>
		    <div class="cl_data">
			<div><label>Зарезервировано:</label></div>
			<div><input id="reserved" class="validate[required,custom[integer]]"  type="text" value="{$product_data.0.reserved}"/></div>
		    </div>
		     <div class="cl_data">
                        <div><label>Фото:</label></div>
                        <div id="files"><img class="showpicture" width="100px" src="{$product_data.0.path_img}"/></div>
                         <div  id="progress" style="display: block; margin-left:20%; width:34% !important;" class="progress">
                            <div  class="progress-bar"></div>
                             <div id="error"></div>
                        </div>
                    </div>
                    <input id="path" type="hidden" value="{$product_data.0.path_img}"/>
		</form> 

                <form enctype="multipart/form-data" action="/storage/upload" id="fileupload">
                    <div><label></label></div>
                    <div>
                        <input type="file" name="userfile" multiple/>	
                    </div>
                </form>
             
            </div><!--detailed-->
	    <div class="cl_orders">
	    </div>
	</div>
    </div>
    {include file="inset/footer.tpl"}
</body>
</html>
